package org.example;

public class Food extends Product{
    private String expirationDate;
    private String origin;
    public Food() {

    }
    public Food(String id, String name, double price, int quantity,
                String expirationDate, String origin) {
        super(id, name, price, quantity);
        this.expirationDate = expirationDate;
        this.origin = origin;
    }
    public String getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(String expirationDate) {
        this.expirationDate = expirationDate;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }
    @Override
    public void result() {
        super.result();
        System.out.println("保质期: " + expirationDate);
        System.out.println("产地: " + origin);
    }



    }

